<?php
/**
 * LG
 * 1.显示静态页面
 * 2.处理登录操作
 */
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller{
    public function Index(){
        $username = cookie('username');
        $this->assign('username',$username);

        $Pro = M('Pro');
        $list = $Pro->where('cId=1')->order('rand()')->select();
        $lists = $Pro->where('cId=1')->order('rand()')->select();
        $this->assign('list',$list);
        $this->assign('lists',$lists);
        $cp = $Pro->where('cId=4')->order('rand()')->select();
        $this->assign('cp',$cp);
        $cop = $Pro->where('cId=4')->order('rand()')->select();
        $this->assign('cop',$cop);
        $this->display();
    }
}
?>